package com.neural.activation;

public class TresholdActivation extends Activation {

	private final double treshold;
	
	public TresholdActivation() {
		this(0.0);
	}
	
	public TresholdActivation(double treshold) {
		super("Treshold");
		this.treshold = treshold;
	}
	
	@Override
	public double getValueFor(double x) {
		return (x  > treshold) ? 1 : 0;
	}

	@Override
	public double derivative(double x) {
		return 0;
	}
}
